<template>
  <div class="openPage">
    <div class="redbg"><img src="/static/images/share1/repackpage.png"></div>
    <div class="pageTxt">
      <div class="userHeader" v-if="shareuserImg"><img :src="shareuserImg"></div>
      <div class="userName" v-if="shareuserName">{{shareuserName}}的分享红包</div>
      <div class="usertxt">恭喜发财，大吉大利</div>
      <div class="userMoney">分享者付款后开<br/>启奖励</div>
      <div class="userRemind">美豆将存入您的账户，可直接微信提现</div>
    </div>
    <div  class="userConfirm" @click="toshare">确认</div>
  </div>
</template>
<script>
  export default {
    data () {
      return {
        shareuserImg: '', 
        shareuserName:'',
        orderNum:'',
        pagetype: '',
      }
    }, 
    onLoad(options){
      this.shareuserImg = options.shareuserImg
      this.shareuserName = options.shareuserName
      this.orderNum = options.orderNum
      this.pagetype = options.pagetype
    },
    methods:{
      toshare(){
        wx.navigateBack();   //返回上一个页面
        // if(this.pagetype == "share"){
        //   const url = `../share/main?bargainOrderNo=${this.orderNum}`;
        //   wx.redirectTo({ url })
        // }else{
        //   const url = `../share-after/main?bargainOrderNo=${this.orderNum}`;
        //   wx.redirectTo({ url })
        // }
      }
    }
  }
</script>

<style scoped>
img{
  width: 100%;
  height: 100%;
  display: block;
}
.openPage{
  width: 100%;
  height: 100%;
  background: #fff;
  overflow: hidden;
}
.openPage .redbg{
  width: 100%;
  height: 120rpx;
}
.openPage .pageTxt{
  font-size: 28rpx;
  color: #303030;
  text-align: center;
  margin-top: -60rpx;
}
.openPage .pageTxt .userHeader{
  width: 120rpx;
  height: 120rpx;
  margin: 0 auto;
}
.openPage .pageTxt .userName{
  margin: 20rpx 0;
}
.openPage .pageTxt .userMoney{
  font-size: 48rpx;
  color: #303030;
  margin: 50rpx 0 70rpx;
  font-weight: bold;
}
.openPage .pageTxt .userRemind{
  color: #4D6AB0;
}
.openPage .userConfirm{
  position: fixed;
  bottom: 0;
  width: 100%;
  height: 98rpx;
  display: flex;
  justify-content: center;
  align-items: center;
  font-size: 36rpx;
  color: #fff;
  background: #D25A3D;
}
</style>
